import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
import { ORDER_PROGRESS, ORDER_QUERY } from 'src/app/api/me/order-query';
import { ORDER_PROGRESS_DATA, ORDER_QUERY_DATA } from 'src/assets/mock/me/order-query';

@Injectable({providedIn: 'root'})
export class OrderQueryService {
  constructor(
    private http: HttpClient
  ) { }

  _getOrderList(pageNumber: number = 1, pageSize: number = 10): Observable<any>{
    const params = new HttpParams({ fromObject: { pageNumber, pageSize } })
    // return this.http.get(ORDER_QUERY, { params })
    return of(ORDER_QUERY_DATA)
  }

  _getOrderProgress(funcNo: string): Observable<any>{
    // return this.http.get(ORDER_PROGRESS + funcNo)
    return of(ORDER_PROGRESS_DATA)
  }
  
}